home *** CD-ROM | disk | FTP | other *** search
- #include <string.h>
- #include <ctype.h>
- #include <errno.h>
- #include <string.hpp>
-
- String String::operator()(int start, int len)
- {
- if (len < 0 || start < 0 || start >= length()) {
- errno = ERANGE;
- String t;
- return t;
- } else {
- if (length()-start < len) len = length()-start;
- String t(body()+start, len);
- return t;
- }
- }
-